﻿<%@ Page Title="" Language="C#" MasterPageFile="~/website/Site1.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" %>
<%@ Import Namespace="ChicagoDealsN" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language = "c#" Runat="Server">
    void Page_Load()
    {
        
    }

    public void Button_Click(Object s, EventArgs e)
    {
        BizUser bu = new BizUser();
        bool c = bu.BL_IsExists(txtEmail.Text);
        if (IsPostBack && c)
        {
            lblConfirmation.Text = txtEmail.Text + " available! ";
            loginlink.Visible = true;
        }
        else
            lblConfirmation.Text = txtEmail.Text + " is not available! ";
    }
  
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        some text
        <asp:TextBox runat="server" ID="txtEmail" />
        <asp:Button ID="btnCheck" runat="server" Text="Check email!" OnClick="Button_Click" /><br/>
        <asp:Label ID="lblConfirmation" runat="server" />
        <asp:Label ID="lblLoginLink" runat="server" />
        <div ID="loginlink" runat="server">
            <a href="Login.aspx">Click here to login</a>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    this is placeholder 2
</asp:Content>
